<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/angular/angular.min.js"></script>
		
		<script type="text/javascript" src="../js/angular/angular-route.min.js"></script>
	</head>
	<body ng-app="myapp" ng-controller="myctrl">
		<div>
			<h3>头部</h3>
				<ul>
					<li><a href="#/">首页</a></li>
					<li><a href="#/product">手机数码</a></li>
					<li><a href="#/homeproduct">家电超市</a></li>
				</ul>
		</div>
		<div ng-view>
			
		</div>
		<input type="text" ng-model="name" />{{name}}
		<div>尾页</div>
		<script type="text/javascript">
			var myapp =angular.module("myapp",[]);
			myapp.config(["$routeProvider",function($routeProvider){
				$routeProvider.when("/",{
					templateUrl:'Demo5_1.html'
				}).when("/product",{
					templateUrl:'Demo5_2.html'
				}).when("/homeproduct",{
					templateUrl:'Demo5_3.html'
				}).otherwise({
					redirectTo:'/'
				});
			}]);
			myapp.controller("myctrl",["$scope",function($scope){
				$scope.name="22";
			}]);
		</script>
	</body>
</html>
